package com.pactera.base.commons.vo;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Collection;
import java.util.Map;

/**
 * 分页类型的响应数据
 */
public class PageData<T>  implements Serializable {

    private static final long serialVersionUID = 984181620748996L;

    public PageData() {
    }

    private Collection<T> list;


    public PageData(long count, long pageCount, Collection<T> list) {
        this.list = list;
        this.count = count;
        this.pageCount = pageCount;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    @ApiModelProperty(value = "总数据条数", example = "199")
    private long count = 0;

    @ApiModelProperty(value = "总分页数", example = "10")
    private long pageCount = 0;

    @ApiModelProperty(value = "扩展信息，比如可以存储像合计、统计这一类的数据")
    private Map<String, Object> ext;

    public Map<String, Object> getExt() {
        return ext;
    }

    public void setExt(Map<String, Object> ext) {
        this.ext = ext;
    }

    public long getPageCount() {
        return pageCount;
    }

    public void setPageCount(long pageCount) {
        this.pageCount = pageCount;
    }

    public Collection<T> getList() {
        return list;
    }

    public void setList(Collection<T> list) {
        this.list = list;
    }
}